<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <link href="/system/common/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/system/common/libs/bootstrap/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/system/common/custom/css/common.css">
    <link rel="stylesheet" href="/system/common/widget/x_fluid_layout/x_fluid_layout.css">
    <script src="/system/common/libs/js/jquery.min.js"></script>
    <script src="/system/common/custom/js/common.js"></script>
    <script src="/system/common/libs/layer/layer.js"></script>
    <script src="/system/common/libs/js/handlebars.js"></script>
    <script src="/system/common/custom/js/tab-operation.js"></script>

    <style>

        table tr.document-info .media {
            margin-top: 10px;
        }

        table tr.document-info .xtable_choice input[type=radio] {
            float: left;
            margin: 2px 10px;
        }

        table tr.document-info .fl {
            float: left;
        }

        table tr.document-info .fr {
            float: right;
        }

        /*底部高度*/
        table tr.document-info .document-label {
            height: 35px;
            line-height: 35px;
        }

        table tr.document-info .document-label span {
            margin-right: 16px;
            font-size: 12px;
        }

        tr.document-info .btn-white {
            color: inherit;
            background: #fff;
            border: 1px solid #e7eaec;
        }

        tr.document-info:hover {
            background-color: #f5f5f5;
        }
        .xtable_choice .media{
            text-align: left;
        }

        thead{
            display: none;
        }
        .x-fluid-layout .widgets-record-group-text-2 {
            color: #f80;
            font-size: 12px;
            line-height: 24px;
            padding: 3px 0 1px 23px;
            text-align: center;
        }

        .srh_nocont_tmr {
            margin: 150px auto 0;
        }

        .srh_nocont_tmr .srh_nocont {
            width: 280px;
            margin: 0 auto;
            padding: 10px 20px;
            background: #f6ffec;
            border: 1px solid #e2f0cd;
        }
        .srh_nocont_tmr .srh_nocont ul {
            width: 215px;
            margin: 0 0 0 50px;
            padding: 0;
            list-style: none;
            line-height: 1.6;
            font-size: 13px;
        }

        .srh_nocont_tmr .srh_nocont ul .ti{
            color: #2bba3e;
            font-weight: bold;
            font-size: 14px;
            margin-bottom: 5px;
        }
    </style>
</head>
<body>
<!--流式布局 xtype="x_fluid_layout-->
<div class="x-fluid-layout">
    <div ctype="x_fluid_lt" class="panel panel-default x-fluid-panel x-fluid-panel-west" style="width: 100%">

        <div class="panel-heading">
            <span class="widgets-record-group-text-2">搜索 <span id="search-key"></span>，共&nbsp;<span id="all-num">0</span>&nbsp;条结果,由于权限问题只能看到部分结果 </span>
        </div>
        <!-- 主体-->
        <div class="panel-body x-fluid-panel-body" style="padding: 0;border: none">
            <div id="no-data-tip" class="srh_nocont_tmr" style="text-align:center;display: none">
                <div class="srh_nocont" style="text-align:left;">
                    <span class="glyphicon glyphicon-exclamation-sign" style="float: left;font-size: 26px;color: #2bba3e"></span>
                    <ul>
                        <li class="ti">通冠建议您：</li>
                        <li>1、请检查输入字词有无错误。</li>
                        <li>2、请换用另外的查询字词。</li>
                        <li>3、请改用较常见的字词。</li>
                        <li>4、请减少查询字词的数量。</li>
                    </ul>
                </div>
            </div>
            <div id="data-content" style="height: 100%;overflow: hidden">
                <table xtype="x_datagrid" class="table table-bordered table-condensed"
                       id="info_table"
                       data-options="{initload:true,privbtn:true,pagination:true,rows:5,
                        busparam:function(){
                            return [{name:'dataId',val:'infoList'}];
                        },
                        attparm:function(){
                            var search=x_getParm('search');
                            return [{name:'title',opt:'like',val:search}];
                        },
                        show:{
                            url:'/system/bus/noticeEdit.html?ts='+(new Date()).getTime(),
                            area:['70%', '80%']
                        },
                        dblclick:function(data){
                            docPreview();
                        },
                        success:function(type,data){
                            if(type=='load'){
                                $('#all-num').html(data['data']['total']);
                                if(data['data']['rows'].length>0){
                                    $('#no-data-tip').hide();
                                    $('#data-content').show();
                                }else{
                                    $('#no-data-tip').show();
                                    $('#data-content').hide();
                                }
                            }
                        }
                    }">
                    <thead>
                    <tr>
                    </tr>
                    </thead>
                    <tbody>
                    <script type="text/html" id="DataList_Script">
                        {{#d.forEach(function(d){}}
                        <tr class="document-info">
                            <td>

                                <div class="media">

                                    <div class="media-body media-right">
                                        <div>
                                            <h5 class="media-heading" style="font-weight: bold">
                                                {{d.title||''}}
                                            </h5>

                                        </div>

                                        <p>
                                            {{d.guidance||''}}
                                        </p>

                                        <div class="document-label">
                                            <div class="fl">
                                            <span>
                                                <button class="btn btn-white btn-xs" type="button"> {{d.type||''}}
                                                </button>
                                            </span>
                                            <span>
                                                作者: {{d.author||''}}
                                            </span>
                                            <span>
                                                <i class="fa fa-clock-o" aria-hidden="true"></i> {{d.addtime||''}}
                                            </span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </td>

                        </tr>
                        {{# })}}
                    </script>
                    </tbody>
                </table>
            </div>


        </div>

    </div>
</div>
</body>
<script type="text/javascript">
    $(function(){
        $("#search-key").html('"'+decodeURI(x_getParm('search'))+'"');
    });

    function docPreview() {
        //判断是否选择
        var selectId=$.x_dofunction($('#info_table'), "getSelectId");
        if (selectId) {
            window.tabOperation.openTabLabel({
                url: "/business/zsk/comment.html?module=infosee" + "&keyId=" + selectId,
                name: '文章查看',
                id: selectId
            })
        } else {
            $.x_alertMsg('请至少选择一条记录!');
        }
    }
</script>
</html>